<<<<<<< HEAD
=======
<<<<<<< HEAD
=======
<<<<<<< HEAD
=======
<<<<<<< HEAD
>>>>>>> 87b07cb3 (用户前端完成)
>>>>>>> 11a963a9 (user front)
>>>>>>> 2dacf7ca (用户页面完成)
import { createRouter, createWebHashHistory } from "vue-router";
 
const routes = [
      {
        path: '/',
        redirect: '/login'    //必须先访问/再重定向到/login
      },
  
      {
        path: '/login',      
        name: 'login',  
        component: () => import('@/views/Login.vue')  // 箭头函数 组件导入：指定该路由对应的页面组件
      }
];
 
//我也不懂，不动就好了，我c的
const router = createRouter({
    history: createWebHashHistory(),
    routes
});
 
<<<<<<< HEAD
=======
<<<<<<< HEAD
=======
<<<<<<< HEAD
=======
=======
import { componentSizes } from "element-plus";
import { createRouter, createWebHashHistory } from "vue-router";

const routes = [
  {
    path: '/',
    redirect: '/login'    //必须先访问/再重定向到/login
  },

  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/Login.vue')  // 箭头函数 组件导入：指定该路由对应的页面组件
  },

  {
    path: '/user',
    name: 'user',
    component: () => import('@/views/layout/UserLayout.vue'),
    redirect: '/userHome',
    children: [
      {
        path: '/userHome',
        name: 'userHome',
        component: () => import('@/views/user/home/UserHome.vue')
      },
      {
        path: '/UploadGoods',
        name: 'UploadGoods',
        component: () => import('@/views/user/UploadGoods.vue')
      },
      {
        path: '/SaleGoods',
        name: 'SaleGoods',
        component: () => import('@/views/user/SaleGoods.vue')
      },
      {
        path: '/Address',
        name: 'Address',
        component: () => import('@/views/user/Address.vue')
      },
      {
        path: '/Cart',
        name: 'Cart',
        component: () => import('@/views/user/Cart.vue')
      },
      {
        path: '/pendingPay',
        name: 'pendingPay',
        component: () => import('@/views/user/pendingPay.vue')
      }, {
        path: '/Search',
        name: 'Search',
        component: () => import('@/views/user/Search.vue')
      },
      {
        path: '/detail/:id',
        name: 'detail',
        component: () => import('@/views/detail/detail.vue')
      },
    ]
  },
  {
    path: '/personalSpace',
    name: 'personalSpace',
    component: () => import('@/views/user/PersonalSpace.vue')
  },
  {
    path: '/payment',
    name: 'payment',
    component: () => import('@/views/user/Payment.vue')
  },
  {
    path: '/pay',
    name: 'pay',
    component: () => import('@/views/user/Pay.vue')
  },

  
  {
    path: '/admin',
    name: 'admin',
    component: () => import('@/views/layout/AdminLayout.vue')
  }
];

//我也不懂，不动就好了，我c的
const router = createRouter({
  history: createWebHashHistory(),
  routes
});

>>>>>>> fb18b0fe (用户界面前端完成)
>>>>>>> 87b07cb3 (用户前端完成)
>>>>>>> 11a963a9 (user front)
>>>>>>> 2dacf7ca (用户页面完成)
export default router;